/*


*/
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n,a,b;
		scanf("%d %d %d",&a,&b,&n);
		int ans = a+b;
		int cnt = 1;
		for(int i = 1;ans<=n;i++)
		{
			if(a<b)
			{
				a = ans;
				ans += b;
				
			}
			else 
			{
				b = ans;
				ans += a;
			
			}
			cnt++;
		}
		printf("%d\n",cnt);
	}
} 
